home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96b.txt
/
000036_icon-group-sender _Sun Oct 20 19:17:45 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1997-01-02
|
1KB
Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:19:14 MST
Message-Id: <3.0b26.32.19961020191730.0068ec34@inforoute.cgs.fr>
X-Sender: grodzens@inforoute.cgs.fr (Unverified)
X-Mailer: Windows Eudora Pro Version 3.0b26 (32)
X-Priority: 1 (Highest)
Date: Sun, 20 Oct 1996 19:17:45 +0100
To: Gordon Peterson <gep2@computek.net>
From: Vladimir <vladimir.grodzenski@InfoRoute.CGS.Fr>
Subject: re: cute nightmare
Cc: icon-group@cs.arizona.edu
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Errors-To: icon-group-errors@cs.arizona.edu
Hi Gordon,
I finally rewrite in Icon a procedure that checks the Credit Card number as
it desribed on http://beachnet.com/~hstiles/cardtype.html
procedure CheckSum(s)
local ccard, checksum
if *( cset(s) -- &digits -- ' -' ) > 0 then fail
ccard:= list()
every put(ccard, integer(!ccard) )
every i:= *ccard-1 to 1 by -2 do ccard[i]*:= 2
checksum:= 0
every checksum +:= !!X
return checksum
end
Less than 5 min. in all, including the access to the home page mentioned
above. Actually, the Internet connection was pretty fast :-)
Vladimir
Best regards
=================================================
Cognitive Technology (Europe)
Phone: +33 1 43375920; Fax: +33 1 43370512
Compuserve: 100700,526
Home Page: http://www.ocr.com
FTP: ftp://ftp.ocr.com/ocr
=================================================